#include "stdafx.h"
#include "CustomSceneNode.h"


CustomSceneNode::CustomSceneNode(void)
{
}


CustomSceneNode::~CustomSceneNode(void)
{
}

void CustomSceneNode::show( irr::IrrlichtDevice* irrDevice )
{
	irr::video::IVideoDriver* driver = irrDevice->getVideoDriver();
	irr::scene::ISceneManager* smgr = irrDevice->getSceneManager();

	smgr->addCameraSceneNode(0, irr::core::vector3df(0,-40,0), irr::core::vector3df(0,0,0));
	CSampleSceneNode *myNode =
		new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666);
	irr::scene::ISceneNodeAnimator* anim =
		smgr->createRotationAnimator(irr::core::vector3df(0.8f, 0, 0.8f));

	if(anim)
	{
		myNode->addAnimator(anim);
		anim->drop();
		anim = 0;
	}
	myNode->drop();
	myNode = 0; // As I shouldn't refer to it again, ensure that I can't

}
